import type { PropType } from 'vue'

import {
  BwCustomComNodeAttrFromTypeEnum,
  BwCustomComNodeAttrDataTypeEnum,
  type BwCustomComPropInfoModel,
  type BwCustomComNodeAttrModel,
} from '@bitwit/base-com-render'

export interface BwCurNodeAttrInfoModel extends BwCustomComPropInfoModel {
  isExpand: boolean
}

export const BwNodeAttrConstValueProps = {
  valueFrom: {
    type: [String] as PropType<BwCustomComNodeAttrFromTypeEnum | null>,
    default: BwCustomComNodeAttrFromTypeEnum.constValue,
  },

  valueDataType: {
    type: [String] as PropType<BwCustomComNodeAttrDataTypeEnum | null>,
    default: BwCustomComNodeAttrDataTypeEnum.string,
  },

  attrInfo: {
    type: [Object] as PropType<BwCurNodeAttrInfoModel>,
  },

  attrData: {
    type: [Object] as PropType<Record<string, BwCustomComNodeAttrModel>>,
  },
}
